import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:get/get_navigation/get_navigation.dart';
import 'package:ladder_cash/app/key_mix.dart';

import '../../../gen/assets.gen.dart';
import '../../../generated/l10n.dart';
import 'common.dart';
import 'decoration_bg.dart';
import 'liner_text.dart';

Widget getProductDetail(
    {required String title,
    required String amountRange,
    required String termInfo,
      required String termInfoDes,
    required String loanRate,
      required String loanRateDes,

    bool isShowRight = false,
    bool isShowBg = false
    }) {
  return Container(
    decoration:isShowBg? BoxDecoration(
      image: getDecorationBg(Assets.home.homeTitleBg.path)
    ):null,
    child: Column(
      children: [
        // getLinerText(title),
        getTabBar(
            title: title,
            isShowRight: isShowRight,
            callback: () {
              Get.back();
            }),
        SizedBox(
          height: 20.w,
        ),
        Row(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.baseline,
          textBaseline: TextBaseline.alphabetic,
          children: [
            // getLinerText("₹",
            //     startColor: Colors.white,
            //     endColor: Colors.white,
            //     fontSize: 32.sp),
            getLinerText(amountRange.hx,
                startColor: Colors.white,
                endColor: Colors.white,
                fontSize: 56.sp),
          ],
        ),
        Container(
          alignment: Alignment.center,
          width: 322.w,
          height: 126.w,
          decoration:
              BoxDecoration(image: getDecorationBg(Assets.home.homeBook.path)),
          child: Container(
            padding:
                EdgeInsets.only(left: 16.w, right: 16.w, top: 20.w, bottom: 8.w),
            width: 322.w,
            height: 68.w,
            decoration: BoxDecoration(
                image: getDecorationBg(Assets.home.home9528Chat.path)),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    middleFont(termInfo,fontsize: 16),
                    middleFont(loanRate ,fontsize: 16),
                  ],
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    middleFont(termInfoDes,fontsize: 16),
                    middleFont(loanRateDes,fontsize: 16),
                  ],
                )
              ],
            ),
          ),
        ),
      ],
    ),
  );
}
